import {defineStore} from "pinia";
import {hospital} from '@/api/hospital/index'

const hospitalInfoDetailStore =  defineStore('hospitalInfoDetailStore',{
    state:()=>{
        return {
            hospitalDetail:{}
        }
    },
    getters:{

    },
    actions:{
        async getHospitalInfo(hosCode:string){
            let response = await hospital.getHospitalDetailByHosCode(hosCode)
            if (response.code == 200){
                this.hospitalDetail = response.data
            }else{
                this.hospitalDetail = {}
            }
        }
    }
})

export {hospitalInfoDetailStore}